<h1 class="h1Text" style="margin: 0px">Your Shopping Cart</h1>
{{if $cart->total_items()>0}}
<form method="post" action="{{$base_index_url}}/cart/my_cart">
    <table width="100%" class="ctable">
        <tr>
            <th>
                PartNum
            </th>
            <th>
                Description
            </th>
            <th>
                Quantity
            </th>
            <th>
                Unit Price
            </th>
            <th>
                Total Ptice
            </th>
            <th>
                Remove
            </th>
        </tr>

        {{foreach from=$cart_items item=i}}
        {{assign var=p value=$i->get_product()}}
        <tr>
            <td>
                {{$p->part_num}}
            </td>
            <td>
                {{assign value=$p->get_description() var=desc}}
                {{$desc->short_desc}}
            </td>
            <td align="right">
                <input type="text" name="cart_product[{{$i->product_id}}][{{$p->part_num}}]" maxlength="2" style="width: 20px;text-align: right" value="{{$i->qty|string_format:"%.0f"}}"  />

            </td>
            <td align="right">
                ${{$p->get_price()|string_format:"%.2f"}}
            </td>
            <td align="right">
                ${{$i->price_x_qty()|string_format:"%.2f"}}
            </td>
            <td >
                <a href="{{$base_index_url}}/cart/my_cart/remove/{{$i->product_id}}">remove</a>
            </td>
        </tr>
        {{/foreach}}
        <tr>
            <td style="font-weight: bold;color:#156EED">
                Total Price:
            </td>
            <td  align="right" colspan="4" style="font-weight: bold;color:#156EED">
                ${{$cart->total_cart_price()|string_format:"%.2f"}}
            </td>
        </tr>
        <tr>
            <td colspan="5" align="center">
                <input type="submit" value="Update"  style="width: 70px" name="op_code" />
                <input type="submit" value="Clear" style="width: 70px" name="op_code" />
                <input type="submit" value="Checkout" style="width: 70px" name="op_code" />
            </td>
        </tr>
    </table>
</form>
{{else}}
<center style="color:gray;margin: 10px">
    Your shopping cart is empty!!
</center>
{{/if}}